#ifndef __SCENE_H__
#define __SCENE_H__

//Resolution
#define SCREEN_RES_X	800
#define SCREEN_RES_Y	600

//Visible part
#define SCENE_WIDTH		23 //20
#define SCENE_HEIGHT	12 //17

//Dimension = Area^2
//#define SCENE_AREA		32

//Map coordinate beginning
#define SCENE_Xo		31 //0
#define SCENE_Yo		37 //56
#define SCENE_Xf		( SCENE_Xo + (SCENE_WIDTH<<5) )
#define SCENE_Yf		( SCENE_Yo + (SCENE_HEIGHT<<5) )

//Radar position (left,top)
#define RADAR_Xo    669 //672
#define RADAR_Yo	450	//60
#define RADAR_Xf	796	//800
#define RADAR_Yf	577	//188

class cScene
{
	private:
		int sceneArea;
		int *map;
		int *walkabilityMap;
		int cx, cy;

		int waterAnimation;
		int waterDelay;

		// Editor mode:
		int selx, sely;

	public:
		cScene(void);
		~cScene(void);

		void LoadMap(char *file);
		void SaveMap(char *file);

		void GetMap(int **map);
		void GetWalkabilityMap(int **walkabilityMap);
		void GetSceneOrigin(int *cx, int *cy);
		int GetWaterAnimation(void);
		int GetSceneArea();

		// Editor mode:
		void GetSelectedTile(int *selx, int *sely);
		void SetSelectedTile(int selx, int sely);
		int GetTileIndex(int x, int y);
		int GetSelectedTileIndex();

		void Move(int pointer);
		void MoveByRadar(int x, int y);
		bool Visible(int cellx, int celly);
		void Update();


};


#endif
